
chartr: chartr.py Makefile
	sed -e "s|\@PYTHONDIR\@|$(pythondir)/chartr|" $< > $@

chartrbindir = $(prefix)/bin
chartrbin_SCRIPTS = chartr

chartrdir = $(pythondir)/chartr
chartr_PYTHON = 	\
	defs.py		\
	MainWindow.py	\
	MMapArea.py	\
	TextThought.py	\
	WebThought.py \
	__init__.py	\
	Links.py	\
	utils.py	\
	Browser.py	\
	BaseThought.py	\
	ImageThought.py	\
	AudioThought.py \
	GSTPlayer.py \
	IconThought.py \
	NoteThought.py \
	ThoughtEnvelop.py \
	TextBufferMarkup.py \
	MapList.py \
	TrayIcon.py	\
	prefs.py \
	chartr.py \
	UndoManager.py \
	backup_old_maps.py \
	PeriodicSaveThread.py

nodist_chartr_PYTHON = defs.py

defs.py: defs.py.in Makefile
	sed						\
		-e s!\@prefix\@!$(prefix)!		\
		-e s!\@datadir\@!$(datadir)!		\
		-e s!\@pkgdatadir\@!$(pkgdatadir)!	\
		-e s!\@libexecdir\@!$(libexecdir)!	\
		-e s!\@libdir\@!$(libdir)!		\
		-e s!\@PACKAGE\@!$(PACKAGE)!		\
		-e s!\@VERSION\@!$(VERSION)!		\
		-e s!\@PYTHONDIR\@!$(PYTHONDIR)!    \
		< $< > $@

BUILT_SOURCES = chartr defs.py

CLEANFILES = $(BUILT_SOURCES)

DISTCLEANFILES = \
	defs.py	\
	$(CLEANFILES)

EXTRA_DIST = defs.py.in \
	chartr.py
